package com.spring.springmvc.响应;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

//
@RequestMapping("setHeader")
@Controller
@ResponseBody
public class 设置Header {
    @RequestMapping(value = "setHeader1",method = RequestMethod.GET)
    public String set1(){
        return "请求header设置成功";
    }

    @RequestMapping(value = "setHeader2",produces ="application/json")
    public String set2(){
        return "响应header设置成功";
    }
}
